module Holo
  require 'pp'
  class Installer
    def self.install!(target, podfile, options = {})
      puts "Holo::Installer#install!:"
      puts target.inspect
      puts podfile.inspect
      puts options

      holo_files = options[:holo_files]
      holo_files ||= 'holo_files'
      puts holo_files

      path = File.expand_path(holo_files, Dir.pwd) #=> Dir.pwd/holo_files/xx.rb
      puts path

      holo_file_objects = Dir.glob(File.expand_path("*.rb", path)).map do |holo_file_path|
        Holofile.from_file(holo_file_path)
      end
      pp holo_file_objects

      # target.store_pod('YYCache')
      # target.store_pod('YYModel', '1.0.4')
    end
  end
end